﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Student_AddStudent : System.Web.UI.Page
{
    private Client client;
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    protected void btnAddStudent_Click(object sender, EventArgs e)
    {
        client = new Client();
        bool status = client.AddStudent(txtFirstName.Text, txtMiddleName.Text, txtLastName.Text, txtGender.Text,
            txtAddress.Text, txtResidency.Text, txtContactNo.Text, txtCollege.Text, txtProgramCode.Text,
            txtMajorCode.Text, txtScholarship.Text);
        if (status == true)
            Response.Write("Successfully Added Student " + txtFirstName.Text);
        else
            Response.Write("Please Try Again..");
    }

    protected void btnClear_Click(object sender, EventArgs e)
    {
        Response.Redirect("admAddStudent.aspx");
    }
};